package com.pucheng.bracelet.viewmodel

import androidx.lifecycle.MutableLiveData
import com.pucheng.bracelet.app.util.CacheUtil
import com.pucheng.bracelet.data.bean.UserInfoBean
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel

class UserInfoViewModel : BaseViewModel(){
    fun saveUserInfo() {
        CacheUtil.setUserInfo(userInfo.value!!)
    }

    var userInfo = MutableLiveData<UserInfoBean>().apply {
        value = CacheUtil.getUserInfo()
    }
}